package com.spring.springboot.scheduled;

import java.util.Date;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
*@author LSY
*Time: 2018年12月19日上午10:56:22
*
*
*/
@Component
public class PrintTask {

	/*@Scheduled(cron = "0/5 * * * * *")
	public void cron() {
		System.out.println("执行测试时间" + new Date(System.currentTimeMillis()));
	}*/
	
	@Scheduled(initialDelay = 1000 * 5, fixedDelay = 1000 * 2)
	public void intialDelay() {
		System.out.println("执行测试时间" + new Date(System.currentTimeMillis()));
	}
}
